package demo1;

//字类、派生类
public class Dog extends Animal{
    static {
        System.out.println("执行了子类的静态代码块4");
    }
    {
        System.out.println("执行了子类的静态代码块5");
    }
    public Dog(String name, int age) {
        super(name, age);
        System.out.println("执行了子类的构造方法！6");
    }

    public void bark(){
        System.out.println(name + "正在汪汪汪！");
    }

}
